package net.chery.update.tool;

import net.chery.rm.VinRowMapper;

/**
 * @author gai
 */
public class VinCheck {
    public static void main(String[] args) {
        System.out.printf("select x.vin ,\n" +
                        "       x.annoucementnumber,\n" +
                        "       x.productname,\n" +
                        "       x.enginecode,\n" +
                        "       x.color,\n" +
                        "       x.salesdealercode,\n" +
                        "       x.salesdealername,\n" +
                        "       x.productiondate,\n" +
                        "       x.invoicedate,\n" +
                        "       x.purchasepurpose,\n" +
                        "       x.vehicleproperty,\n" +
                        "       x.saleprice,\n" +
                        "       x.id,\n" +
                        "       x.productcode,\n" +
                        "       y.customersoldid,\n" +
                        "       vehiclesoldid,\n" +
                        "       z.name,\n" +
                        "       z.code,\n" +
                        "       a.purchasehistory,\n" +
                        "       a.isspecialsale,\n" +
                        "       a.vin,\n" +
                        "       b.name,\n" +
                        "       b.cellphonenumber,\n" +
                        "       b.gender,\n" +
                        "       b.customersoldextended,\n" +
                        "       b.diploma,\n" +
                        "       b.provincename,\n" +
                        "       b.cityname,\n" +
                        "       b.address,\n" +
                        "       b.idnumber,\n" +
                        "       b.createtime,\n" +
                        "       b.id\n" +
                        "from %s x\n" +
                        "         left join %s y on x.id = y.vehiclesoldid\n" +
                        "         left join %s z on x.productcode = z.code\n" +
                        "         left join %s a on x.vin = a.vin\n" +
                        "         left join %s b on y.customersoldid = b.id",
                "d_chery.ods_dms_vehiclesold","d_chery.ods_dms_customervehiclesold","d_chery.ods_vls_product","d_chery.ods_vls_vehicleprojectinformation",
                "d_chery.ods_dms_customersold");
//        String vin="LNNAJDDS5PDA32278";
//        System.out.printf("check-%s:%s%n",vin,VinRowMapper.checkVin(vin));
//        for (int i = 1; i <= 9; i++) {
//            for (int j = 1; j <= i; j++) {
//                System.out.printf("%sX%s=%s\t",j,i,i*j);
//            }
//            System.out.println();
//        }
    }
}
